package com.ruoyi.gwc.domain;

import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.ruoyi.app.AddressObjectDeserializer;
import com.ruoyi.common.core.domain.AddressObject;
import com.ruoyi.common.core.domain.FileObject;
import com.ruoyi.system.domain.typehandler.AddressObjectTypeHandler;
import com.ruoyi.system.domain.typehandler.FileObjectTypeHandler;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;


/**
 * 用车申请对象 t_vehicle_application
 * 
 * @author wp
 * @date 2024-12-16
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
@ToString
@Accessors(chain = true)
@TableName(value = "t_vehicle_application")
public class TVehicleApplication extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 申请单id */
    @TableId(type = IdType.ASSIGN_ID)
    private Long applyId;

    /** 所属作业公司 */
    private Long companyId;
    @Excel(name = "公司名称",sort = 1)
    @TableField(exist = false)
    private String companyName;

    /** 派车数 */
    @Excel(name = "派车数",sort = 10)
    private Long vehicleNum;

    /** 申请人姓名 */
    @Excel(name = "申请人姓名",sort = 2)
    private String applyName;

    /** 申请人电话 */
    @Excel(name = "申请人电话",sort = 3)
    private String applyTel;

    /** 用车人姓名 */
    @Excel(name = "用车人姓名",sort = 4)
    private String useName;

    /** 用车人电话 */
    @Excel(name = "用车人电话",sort = 5)
    private String useTel;

    /** 用途 0：出差，1：调研，2：招聘，3：拜访客户，4：参加会议，5：接待客户 */
    @Excel(name = "用途",sort = 6, dictType = "purpose")
    private Long purpose;

    /** 事由 */
    @Excel(name = "事由",sort = 7)
    private String remark;

    /** 上车地点 */
    @Excel(name = "上车地点",sort = 8)
    private String boardingLocation;

    @ApiModelProperty("目的地")
    @TableField(typeHandler = AddressObjectTypeHandler.class)
//    @Excel(name = "目的地",sort = 9)
    private List<AddressObject> destination;


    /** 上车时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "上车时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss",sort = 12)
    private Date boardingTime;

    /** 返程时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "返程时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss",sort = 13)
    private Date returnTime;

    /** 用车人数 */
    @Excel(name = "用车人数",sort = 11)
    private Long userNum;

    /** 订单状态（0：已申请，1：已审批，2已调度，3已接单，4已出车，5已还车，6撤销订单） */
    @Excel(name = "订单状态", sort = 14, dictType = "applicationOrderStatus")
    private Long orderStatus;

    /** 凭证列表 json list */
    @ApiModelProperty("凭证列表 json list")
    @TableField(typeHandler = FileObjectTypeHandler.class)
    private List<FileObject> imageList;

    /** 还车凭证列表 json list */
    @ApiModelProperty("还车凭证列表 json list")
    @TableField(typeHandler = FileObjectTypeHandler.class)
    private List<FileObject> imageReturn;

    //车牌号
    @TableField(exist = false)
    private String numberPlate;

    /** 驾驶员id   */
    @TableField(exist = false)
    private Long driverId;

    /** 订单状态（2已调度，3已接单，4已出车，5已还车） */
    @TableField(exist = false)
    private Long dispatchOrderStatus;

    @ApiModelProperty("开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:dd", timezone = "GMT+8")
    @TableField(exist = false)
    private Date startTime;

    @ApiModelProperty("结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:dd", timezone = "GMT+8")
    @TableField(exist = false)
    private Date endTime;

    public void setApplyId(Long applyId) 
    {
        this.applyId = applyId;
    }

    public Long getApplyId() 
    {
        return applyId;
    }
    public void setCompanyId(Long companyId) 
    {
        this.companyId = companyId;
    }

    public Long getCompanyId() 
    {
        return companyId;
    }

    public void setCompanyName(String companyName)
    {
        this.companyName = companyName;
    }
    public String getCompanyName(){  return companyName;  }


    public void setVehicleNum(Long vehicleNum) 
    {
        this.vehicleNum = vehicleNum;
    }

    public Long getVehicleNum() 
    {
        return vehicleNum;
    }
    public void setApplyName(String applyName) 
    {
        this.applyName = applyName;
    }

    public String getApplyName() 
    {
        return applyName;
    }
    public void setApplyTel(String applyTel) 
    {
        this.applyTel = applyTel;
    }

    public String getApplyTel() 
    {
        return applyTel;
    }
    public void setUseName(String useName) 
    {
        this.useName = useName;
    }

    public String getUseName() 
    {
        return useName;
    }
    public void setUseTel(String useTel) 
    {
        this.useTel = useTel;
    }

    public String getUseTel() 
    {
        return useTel;
    }
    public void setPurpose(Long purpose)
    {
        this.purpose = purpose;
    }

    public Long getPurpose()
    {
        return purpose;
    }
    public void setBoardingLocation(String boardingLocation) 
    {
        this.boardingLocation = boardingLocation;
    }

    public String getBoardingLocation() 
    {
        return boardingLocation;
    }
    public void setDestination(List<AddressObject> destination)
    {
        this.destination = destination;
    }

    public List<AddressObject> getDestination()
    {
        return destination;
    }
    public void setBoardingTime(Date boardingTime) 
    {
        this.boardingTime = boardingTime;
    }

    public Date getBoardingTime() 
    {
        return boardingTime;
    }
    public void setReturnTime(Date returnTime) 
    {
        this.returnTime = returnTime;
    }

    public Date getReturnTime() 
    {
        return returnTime;
    }
    public void setUserNum(Long userNum) 
    {
        this.userNum = userNum;
    }

    public Long getUserNum() 
    {
        return userNum;
    }
    public void setOrderStatus(Long orderStatus) 
    {
        this.orderStatus = orderStatus;
    }

    public Long getOrderStatus() 
    {
        return orderStatus;
    }

    public void setImageReturn(List<FileObject> imageReturn)  {   this.imageReturn = imageReturn;   }
    public List<FileObject> getImageReturn()
    {
        return imageReturn;
    }

    public void setImageList(List<FileObject> imageList)  {   this.imageList = imageList;   }
    public List<FileObject> getImageList()
    {
        return imageList;
    }

    public void setNumberPlate(String numberPlate)
    {
        this.numberPlate = numberPlate;
    }
    public String getNumberPlate()
    {
        return numberPlate;
    }

    public void setDriverId(Long driverId)
    {
        this.driverId = driverId;
    }

    public Long getDriverId()
    {
        return driverId;
    }

    public void setDispatchOrderStatus(Long dispatchOrderStatus)
    {
        this.dispatchOrderStatus = dispatchOrderStatus;
    }

    public Long getDispatchOrderStatus()
    {
        return dispatchOrderStatus;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("applyId", getApplyId())
            .append("companyId", getCompanyId())
            .append("companyName", getCompanyName())
            .append("vehicleNum", getVehicleNum())
            .append("applyName", getApplyName())
            .append("applyTel", getApplyTel())
            .append("useName", getUseName())
            .append("useTel", getUseTel())
            .append("purpose", getPurpose())
            .append("remark", getRemark())
            .append("boardingLocation", getBoardingLocation())
            .append("destination", getDestination())
            .append("boardingTime", getBoardingTime())
            .append("returnTime", getReturnTime())
            .append("userNum", getUserNum())
            .append("orderStatus", getOrderStatus())
            .append("imageList", getImageList())
            .append("numberPlate", getNumberPlate())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("updateBy", getUpdateBy())
            .append("createBy", getCreateBy())
            .toString();
    }
}
